GtkLabel: don't eat too many button release events
authorMatthias Clasen <mclasen@redhat.com>
Tue, 18 Feb 2014 04:09:44 +0000 (23:09 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 18 Feb 2014 04:09:44 +0000 (23:09 -0500)
We should only eat button release events when the label is
actually selectable, since the comment indicates that we
want to eat the release events belonging to press events
that triggered a selection. This fixes problems with actions
on parent widgets that are triggered by button release,
as seen in this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=724541

gtk/gtklabel.c

index 27e202ebf961ef0bf310f1a73511a7ed8f1d51b6..fbb0d87b5d07ede93471ee6f0fc6a431051712d5 100644 (file)
@@ -4801,7 +4801,10 @@ gtk_label_button_release (GtkWidget      *widget,
   /* The goal here is to return TRUE iff we ate the
    * button press to start selecting.
    */
-  return TRUE;
+  if (info->selectable)
+    return TRUE;
+
+  return FALSE;
 }
 
 static void